package com.zmovie.framework.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zmovie.framework.domain.MovieAge;
import com.zmovie.framework.domain.MovieArea;
import com.zmovie.framework.service.MovieAgeService;
import com.zmovie.framework.mapper.MovieAgeMapper;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author lenovo
* @description 针对表【movie_age】的数据库操作Service实现
* @createDate 2023-11-30 12:28:02
*/
@Service
public class MovieAgeServiceImpl extends ServiceImpl<MovieAgeMapper, MovieAge>
    implements MovieAgeService{


    @Override
    public List<MovieAge> listMovieAge(MovieAge movieAge) {
        LambdaQueryWrapper<MovieAge> wrapper = new LambdaQueryWrapper<>();
        wrapper.like(movieAge.getName() != null, MovieAge::getName, movieAge.getName());
        wrapper.orderByAsc(MovieAge::getId);
        return list(wrapper);
    }
}




